package com.aaa.dao;

import com.aaa.dto.AdminDto;
import com.aaa.dto.AdminRoleDto;
import com.aaa.dto.UserDto;
import com.aaa.pojo.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户管理dao接口
 */

public interface UserDao extends BaseMapper<User> {


    /**
     * 根据用户名去查询用户对象（主要要查询密码）
     *
     * @param username
     * @return
     */
    User findUserInfoByUsername(String username);

    List<UserDto> findAllUser();

    List<AdminDto> findAllAdminUser();

    List<AdminRoleDto> findAdminRoleList();

    int updateRoleByAdminId(@Param("userId") Integer userId, @Param("roleId") Integer roleId);
}
